﻿
namespace TFSChangeLog.DataAccess
{
    using Microsoft.TeamFoundation.Framework.Client;

    /// <summary>Summary description for <see cref="CurrentUserDataAccess"/> class.</summary>
    public static class CurrentUserDataAccess
    {
        /// <summary>Summary description for <c>CurrentUserDataAccess</c> method.</summary>
        /// <returns>TODO: returns an object of type <c>Microsoft.TeamFoundation.Framework.Client.TeamFoundationIdentity</c>.</returns>
        public static TeamFoundationIdentity GetAuthenticatedCurrentUserIdentity()
        {
            TeamFoundationIdentity currentUserIdentity = null;
            var tfs = TFSConnection.GetTFSConnection();
            tfs.GetAuthenticatedIdentity(out currentUserIdentity);
            return currentUserIdentity;
        }
    }
}
